import React from "react"
import { useRoutes } from "react-router-dom"

import MyNavLink from "./components/MyNavLink"
import routers from "./router"
// import axios from 'axios'
export default function App() {
  // axios.get().then().err()

  const router = useRoutes(routers)

  return (
    <div>
      <MyNavLink to="/home" end>
        home
      </MyNavLink>
      {/* end 子集路由高亮 父级不高亮 */}
      <br />
      <MyNavLink to="/about">about</MyNavLink>
      <br />
      <br />
      <br />
      <br />
      {router}
      {/* <Routes>
          <Route path="/about" element={<About />}></Route>
          <Route path="/home/*" element={<Home />}></Route>
          <Route path="/" element={<Navigate to="/about" />}></Route>
        </Routes> */}
    </div>
  )
}
